﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master"
    Inherits="User_Customer_Maintain" meta:resourcekey="PageResource1" CodeFile="User_Customer_Maintain.aspx.cs" %>
     <%@ Register Src="~/UserControl/GridPager.ascx" TagName="GridPager"  TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>分销列表客户维护</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
  <script src="../JavaScript/empchecks.js" type="text/javascript"></script>
    <div>
        <table id="wsd_inputtable">
            <tr>
                <td colspan="6" class="tabletitle">
                    搜索选项
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    门店名称:
                </td>
                <td nowrap="nowrap">
                    <asp:TextBox runat="server" ID="txtCustomer" Width="200px" MaxLength="50"></asp:TextBox>
                </td>
                <td class="tablefield">
                    部门:
                </td>
                <td nowrap="nowrap">
                    <asp:TextBox ID="txtOrg" runat="server" Enabled="false" onkeydown="alert('请选择部门');return false;"
                        OnTextChanged="txtOrg_TextChanged"></asp:TextBox>
                    <%--<img src="../Resources/Images/search.png" alt="查找" style="cursor: pointer;" 
                        onclick="openPopup('../System/PopupOrganization.aspx?NameControlId=<%# txtOrg.UniqueID %>&ChainsControlID=<%# txtHidChains.UniqueID %>&ValueControlId=<%# txtHidOrg.UniqueID %>&SelectType=multi','','300','500');" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtOrg"
                        ErrorMessage="请选择部门"></asp:RequiredFieldValidator>--%>
                </td>
                <td class="tablefield">
                    分配类型:</td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlAssigned" Width="130">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    销售渠道:
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlChannel" Width="130">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    经销商:
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList ID="ddlChains" runat="server">
                    </asp:DropDownList>
                </td>
                <td class="tablefield" colspan="2">
                    &nbsp;<asp:Button ID="btnQuery" runat="server" class="wsd_button2" Text="查  询" OnClick="btnQuery_Click" />
                    <input type="button" class="wsd_button2" size="47" value="重  置" name="reset" onclick="clearForm('form1')" /></td>
            </tr>
            
            <tr>
                <td class="tablefield">
                    &nbsp;
                </td>
                <td nowrap="nowrap">
                  
                </td>
                <td>
                    <input id="txtHidOrg" type="hidden" runat="server" />
                    <input id="txtHidChains" type="hidden" runat="server" />
                    <input id="txtHidCounty" type="hidden" runat="server" />                    
                </td>
                <td class="buttonarea" colspan="3">
                    &nbsp;&nbsp;&nbsp;
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle">
                    客户列表 巡店督导:<asp:Label runat="server" ID="lblMobileUserInfo"></asp:Label>
                </td>
                <td class="tabletitle">
                    </td>
            </tr>
        </table>
          <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
        <ContentTemplate>
        <table id="wsd_listtable" width="100%">
            <tr>
                <td style="width: 100%">
                    <asp:GridView BorderWidth="0"  GridLines="None" Width="100%" ID="gvChannelType" runat="server" AutoGenerateColumns="False"
                        DataKeyNames="ID,RCID" EmptyDataText="没有可显示的数据." EmptyDataRowStyle-Font-Bold="true"
                        EmptyDataRowStyle-HorizontalAlign="Center" EnableEmptyContentRender="true" OnRowDataBound="Grid_RowDataBound"
                        AllowPaging="True" PageSize="15" OnPageIndexChanging="gvChannelType_PageIndexChanging">
                        <HeaderStyle CssClass="titlist" />
                        <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                        <Columns>
                            <asp:BoundField HeaderText="编号" DataField="Code" />
                            <asp:TemplateField HeaderText="RCID" Visible="false">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lblRCID" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="门店名称" DataField="NAME" />
                            <asp:BoundField HeaderText="销售渠道" DataField="Channel" />
                            <asp:BoundField HeaderText="地址" DataField="ADDRESS_LINE" />

                            <asp:BoundField DataField="TELEPHONE" HeaderText="电话" Visible="False" />
                            <asp:BoundField DataField="FAX" HeaderText="手机" Visible="False" />
                            <asp:TemplateField HeaderText="全选">
                                <HeaderTemplate>
                                   <input  type="checkbox" id="chkAll" name="chkAll" onclick="Check1(this,'cbxSelected')" />全选
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox runat="server" ID="cbxSelected" Checked='<%# Convert.ToBoolean(Eval("Selected")) %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle CssClass="evenline" />
                        <AlternatingRowStyle CssClass="oddline" />
                        <PagerSettings FirstPageText="首页"  LastPageText="尾页" Visible="false" Mode="NumericFirstLast" PageButtonCount="30" />
                    </asp:GridView>
                      <uc1:GridPager ID="GridPager1" runat="server" Visible="false"  />
                </td>
            </tr>
        </table>
         </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnQuery" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td width="100%" class="tabletitle">
                    操作选项
                </td>
            </tr>
            <tr>
                <td class="buttonarea">
                    <asp:Button ID="btnSubmitAll" runat="server" class="wsd_button2" Text="全部提交" onclick="btnSubmitAll_Click" 
                      Visible="false"    />&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnSubmiet" runat="server" class="wsd_button2" Text="提  交" OnClick="btnSubmit_Click" OnClientClick="return HaveCheck('cbxSelected','没有选择任何项');" />&nbsp;&nbsp;
                    <input type="button" value="返  回" class="wsd_button2" onclick="window.location.href='User_Route_List.aspx';" />
                    <%--<asp:Button ID="btnCancel" runat="server" class="wsd_button2" Text="返  回" CausesValidation="false"
                        OnClick="btnCancel_Click" />--%>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
